from .metainfo_custom import metainfo
from .vis_utils import show_result_pyplot

def visualize_func(frame, result, confidence_threshold,
              custom_palette="mapillay_cls10"):
    vis_meta = metainfo[custom_palette]
    draw_img_post = show_result_pyplot(
        frame,
        result=result,
        classes=vis_meta["classes"],
        palette=vis_meta["palette"],
        opacity=0.6,
        with_labels=False,
        draw_gt=False,
        show=False,
        conf=confidence_threshold,
    )
    return draw_img_post